<template>
  <div >
    <activity-alert-details/>
   <!-- <ul class="content">
      <li v-for="(item, index) of activityItem" :key="index">
        <p>{{item.title}}</p>
      </li>
    </ul>-->
  </div>
</template>

<script>
import BScroll from 'better-scroll'
import ActivityAlertDetails from './compinents/AlertDetails'
export default {
  name: 'Activity',
  components: {
    ActivityAlertDetails
  },
  data () {
    return {
      scroll: null,
      activityItem: [],
      current: 0, // 当前页码
      pageSize: 7, // 每页数据10
      endOfTheScreen: false // 是否滚动到底部
    }
  },
  mounted () {
    this.$nextTick(() => {
      this.scroll = new BScroll(this.$refs.wrapper, {
        scrollY: true,
        click: true,
        probeType: 3
      })
    })
  },
  created () {
    this.getActivityItem(this.current, this.pageSize) // 首次加载
  },
  methods: {
    getActivityItem (current, pageSize) {
      this.axios.get('/activityItem')
        .then((res) => {
          console.log(res)
          let data = res.data
          this.activityItem = data
        })
    }
  }
}
</script>

<style scoped lang="stylus">
  .activity
    position fixed
    top 0
    bottom 110px
    overflow hidden
    width 100%
    box-sizing border-box
    background #fff
    padding 18px 0 20px
    li
      border 1px solid red
      margin-bottom 20px
      p
        font-size 33px
</style>
